package com.attendance.chdingtask.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Data
@Table(name="md_data_info")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModel(description = "员工表")
@EntityListeners(AuditingEntityListener.class)
public class MdDataInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @ApiModelProperty(value = "主键")
    private  Long id;

    /**
     * 钉钉人员id
     */
    private String userId;

    private String userName;

    /**
     * 钉钉部门id 对应多个部门
     */
    private String deptId;

    /**
     * 钉钉部门名称 对应多个部门
     */
    private String deptName;


    /**
     * 年份
     */
    private String year;


    /**
     * 月份
     */
    private String month;


    /**
     * 日期
     */
    private String MdDate;

    /**
     * 日期
     */
    private String MdTime;


    /**
     * 魔点设备名称
     */
    private  String deviceId;


    /**
     * 魔点设备名称
     */
    private  String deviceName;

    /**
     * 门禁简称
     */
    private  String shortName;


    /**
     * 进出入标识符：J-表示进；C-表示出
     */
    private String flag;

    private String areaId;

    /**
     * 区域名称：  生产区-0；生活区-1；维护基地-2；
     */
    private String areaName;


    /**
     * 标签
     */
    private String MdFlag;

    /**
     * 删除标志
     */
    private Integer dr = Integer.valueOf(0);


    @CreatedDate
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @LastModifiedDate
    @Column(name = "modify_time")
    @ApiModelProperty(value = "修改时间")
    private Date modifyTime;


}
